package com.jic.market.api.after;

import com.jic.common.base.vo.RestResult;

import com.jic.market.request.PromotionPolymericRequest;
import com.jic.market.request.rest.PresellProductRequest;
import com.jic.market.request.rest.groupon.GrouponInfoRequest;
import com.jic.market.request.rest.seckill.SeckillInfoRequest;
import com.jic.market.response.PresellProductResponse;
import com.jic.market.response.PromotionPolymericResponse;
import com.jic.market.response.PromotionSingleProductResponse;
import com.jic.market.response.rest.SeckillInfoResponse;
import com.jic.market.response.rest.groupon.GroupInfoFeignResponse;
import com.jic.market.response.rest.groupon.GrouponInfoResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author wj
 * @Description:
 * @date 2020-05-13 10:23
 */
@Api(value = "营销中心-feign", tags = "营销中心-feign")
@FeignClient(name = "jic-market", path = "/api/marketApi")
public interface MarketApi {

    @PostMapping("/getGroupInfo")
    @ApiOperation("拼团商品详情")
    RestResult<GrouponInfoResponse> getGroupInfo(@RequestBody GrouponInfoRequest request);

    @PostMapping("/getSecondsKillInfo")
    @ApiOperation("秒杀商品详情")
    RestResult<SeckillInfoResponse> getSecondsKillInfo(@RequestBody SeckillInfoRequest seckillInfoRequest);

    @PostMapping("/updateCouponStatus")
    @ApiOperation("修改优惠券状态")
    RestResult<String> updateCouponStatus(@RequestBody String couponCode);

    @PostMapping("/queryPresellByMpId")
    @ApiOperation("查询商品参加的预售活动")
    RestResult<PresellProductResponse> queryPresellByMpId(@RequestBody PresellProductRequest request);

    @PostMapping("/queryPromotionPolymericProduct")
    @ApiOperation("查询促销聚合商品列表")
    RestResult<PromotionPolymericResponse> queryPromotionProduct(@RequestBody PromotionPolymericRequest request);

    @PostMapping("/querySingleByMpId")
    @ApiOperation("查询商品参加的单一活动")
    RestResult<PromotionSingleProductResponse> querySingleByMpId(@RequestBody PromotionPolymericRequest request);

    @PostMapping("/querySingleByMpIds")
    @ApiOperation("查询商品参加的单一活动")
    RestResult<List<PromotionSingleProductResponse>> querySingleByMpIds(@RequestBody List<Long> mpIds);

}
